<?php

class Dashboard extends Controller {

	function __construct() {
		parent::__construct();
		//echo "dashboard Controller";
		Session::init();
		$logged = Session::get('loggedIn');
		if ($logged == false) {
			Session::destroy();
			header('location: login');
			exit;	
		}	
		//print_r($_SESSION);
		//$this->view->js = array('dashboard/js/dashboard.js');

	}
	
	function index() {
		$this->view->render('dashboard/index');
	}

	function logout(){
		Session::destroy();
		header('location:' . URL . '');
		exit;	
	}
	
}